package com.CodeCraft.builder;

import com.CodeCraft.bean.Constants;
import com.CodeCraft.utils.DateUtils;

import java.io.BufferedWriter;
import java.io.IOException;
import java.util.Date;

/**
 * <p>
 * 描述:
 * </p>
 *
 * @author Dorain
 * @version 1.0.0
 * @since 2025/3/31
 */
public class BuildComment {

    public static void createClassComment(BufferedWriter bw, String classComment) throws IOException {
        bw.write("/**");
        bw.newLine();
        bw.write("* @描述: " + classComment);
        bw.newLine();
        bw.write("* @Date: "+ DateUtils.format(new Date(), DateUtils._YYYYMMDD));
        bw.newLine();
        bw.write("* @Author: "+ Constants.AUTHOR_NAME);
        bw.newLine();
        bw.write("*/");
        bw.newLine();
    }

    public static void createFieldComment(BufferedWriter bw,String fieldComment) throws IOException {
        bw.write("\t/**");
        bw.newLine();
        bw.write("\t * " + (fieldComment==null?"":fieldComment));
        bw.newLine();
        bw.write("\t */");
        bw.newLine();
    }

    public static void createMethodComment(BufferedWriter bw) {
    }
}
